<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script language="JavaScript" type="text/JavaScript" src="tree/jQuery1.6.2.js"></script>
<link rel="STYLESHEET" type="text/css" href="tree/dhtmlxtree.css">
<script  src="tree/dhtmlxcommon.js"></script>
<script  src="tree/dhtmlxtree.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  tree = new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
  tree.setSkin('dhx_skyblue');
  //加载树结构的图标
  tree.setImagePath("./tree/imgs/csh_bluefolders/");
//设置是否允许显示树图片
 tree.enableTreeImages(0);//1 - on, 0 - off
  tree.enableDragAndDrop(0);
   tree.enableCheckBoxes(true);
  
 //  允许三种状态的复选框（全选、不选、部分选中）
tree.enableThreeStateCheckboxes(1)// 1 - on, 0 - off;

  tree.enableTreeLines(false);
  tree.setOnRightClickHandler(function(id){
    tree.selectItem(id);
    $("#mm").val(id);
  });



var id=tree.getFileTreeNowId();
 tree.setXMLAutoLoading("ts.php");

  tree.loadXML("ts.php?id=0&xk=3&xd=1");
  //设置是否显示树线
 tree.enableTreeLines(1);
 //设置是否允许IE缓存
 tree.preventIECashing='disable';//mode - enable/disable random seed ( disabled by default )


$("#test").click(function(){
	
	var tt=tree.getAllChecked();
	alert(tt);
})

});


</script>

  <div id="treeboxbox_tree" style="width:250px; height:auto;border:1px solid Silver; font-size:14px" ></div>
  
<p>  <input name="test" type="button" value="获取选择的值" id="test"></p>





